﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HidesaburoDotNET.Core.AI;
using HidesaburoDotNET.Core;

namespace HidesaburoDotNET.Test
{
    /// <summary>
    /// テスト用完全スルーのAI
    /// </summary>
    public class MockAI :AbstractAI
    {

        int countDecideFinish;

        public int CountDecideFinish
        {
            get { return countDecideFinish; }
            set { countDecideFinish = value; }
        }
        int countSelectDiscard;

        public int CountSelectDiscard
        {
            get { return countSelectDiscard; }
            set { countSelectDiscard = value; }
        }
        int countCheckAction;

        public int CountCheckAction
        {
            get { return countCheckAction; }
            set { countCheckAction = value; }
        }
        public MockAI():base()
        {
            
        }
        public void ResetCounts()
        {
            countCheckAction = countDecideFinish = countSelectDiscard = 0;
        }

        public override bool DecideFinish(HidesaburoDotNET.Core.CompleteEventArgs args)
        {
            countDecideFinish++;
            return true;
        }

        public override HidesaburoDotNET.Core.Hai SelectDiscard()
        {
            countSelectDiscard++;
            return player.Tehai[0];
        }

        public override HidesaburoDotNET.Core.NakiAction CheckAction(HidesaburoDotNET.Core.Player sender, HidesaburoDotNET.Core.Hai discard)
        {
            countCheckAction++;
            return NakiAction.None;
        }

        public override object Clone()
        {
            return new MockAI();
        }
    }
}
